<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      th:replace="fragments/layout(title='设备维修-编辑',jsPaths='/static/js/devices/devicerepair/add.js')">
<div class="right" th:fragment="right">
    <!--面包屑-->
    <div class="breadcrumb layui-bg-gray">
                <span class="layui-breadcrumb" lay-separator=">">
                    <a th:href="@{/}">首页</a>
                    <a href="/devices">设备管理</a>
                    <a href="/repairDevices">报修记录</a>
                    <a><cite>编辑</cite></a>
                </span>
    </div>

    <!--主体内容区-->
    <div class="form-content layui-container">
            <form class="layui-form" th:action="@{/repairDevices/update}" method="post">
                <div class="layui-form-item">
                    <label class="layui-form-label must">设备</label>
                    <div class="layui-input-block">
                        <input type="hidden" name="id"  th:value="${repairaDevice.id}">
                        <select  name="repairaDeviceId" lay-filter="repairaDeviceId"  lay-verify="required">
                            <option value="">请选择设备</option>
                            <option th:each="device: ${devicesList}" th:value="${device.id}" th:attr="data-code=${device.code},data-name=${device.name}"    th:text="${device.name}"  th:selected="${device.id} eq ${repairaDevice.repairaDeviceId}"></option>
                        </select>
                        <input type="hidden" name="repairaDeviceCode"   id="devicesCode" th:value="${repairaDevice.repairaDeviceCode}">
                        <input type="hidden" name="repairaDeviceName"  id="devicesName" th:value="${repairaDevice.repairaDeviceName}">
                    </div>
                </div>
             <!--   <div class="layui-form-item">
                    <label class="layui-form-label">报修人员</label>
                    <div class="layui-input-block">
                        <input type="text" name="repairaUserName"    th:value="${repairaDevice.repairaUserName}"  lay-verify="required" placeholder="请输入报修人员姓名" autocomplete="off" class="layui-input">
                    </div>
                </div>-->
                <div class="layui-form-item">
                    <label class="layui-form-label must">报修状态</label>
                    <div class="layui-input-block">
                        <select name="repairaStatus"   lay-verify="required">
                            <option value="">请选择设备状态</option>
                            <option value="0" th:selected="${repairaDevice.repairaStatus eq 0}">维修中</option>
                            <option value="1" th:selected="${repairaDevice.repairaStatus eq 1}">维修完成</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn  layui-btn-normal" lay-submit lay-filter="submitBtn">保存</button>
                        <a href="/repairDevices" class="layui-btn layui-btn-primary">返回</a>
                    </div>
                </div>
            </form>
    </div>
</div>
</html>